using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._ProjectionsandTransformations._Raster
{
    /// <summary>
    /// <para>Rotate</para>
    /// <para>Turns a raster dataset around a specified pivot point.</para>
    /// <para>围绕指定的枢轴点转动栅格数据集。</para>
    /// </summary>    
    [DisplayName("Rotate")]
    public class Rotate : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public Rotate()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_raster">
        /// <para>Input Raster</para>
        /// <para>The raster dataset to rotate.</para>
        /// <para>要旋转的栅格数据集。</para>
        /// </param>
        /// <param name="_out_raster">
        /// <para>Output Raster Dataset</para>
        /// <para><xdoc>
        ///   <para>The name, location, and format for the dataset you are creating. When storing a raster dataset in a geodatabase, do not add a file extension to the name of the raster dataset. When storing your raster dataset to a JPEG file, a JPEG 2000 file, a TIFF file, or a geodatabase, you can specify a compression type and compression quality.</para>
        ///   <para>When storing the raster dataset in a file format, you need to specify the file extension:</para>
        ///   <bulletList>
        ///     <bullet_item>.bil—Esri BIL</bullet_item><para/>
        ///     <bullet_item>.bip—Esri BIP</bullet_item><para/>
        ///     <bullet_item>.bmp—BMP</bullet_item><para/>
        ///     <bullet_item>.bsq—Esri BSQ</bullet_item><para/>
        ///     <bullet_item>.dat—ENVI DAT</bullet_item><para/>
        ///     <bullet_item>.gif—GIF</bullet_item><para/>
        ///     <bullet_item>.img—ERDAS IMAGINE</bullet_item><para/>
        ///     <bullet_item>.jpg—JPEG</bullet_item><para/>
        ///     <bullet_item>.jp2—JPEG 2000</bullet_item><para/>
        ///     <bullet_item>.png—PNG</bullet_item><para/>
        ///     <bullet_item>.tif—TIFF</bullet_item><para/>
        ///     <bullet_item>.mrf—MRF</bullet_item><para/>
        ///     <bullet_item>.crf—CRF</bullet_item><para/>
        ///     <bullet_item>No extension for Esri Grid</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要创建的数据集的名称、位置和格式。在地理数据库中存储栅格数据集时，请勿在栅格数据集的名称中添加文件扩展名。将栅格数据集存储为 JPEG 文件、JPEG 2000 文件、TIFF 文件或地理数据库时，可以指定压缩类型和压缩质量。</para>
        ///   <para>以文件格式存储栅格数据集时，需要指定文件扩展名：</para>
        ///   <bulletList>
        ///     <bullet_item>.bil - Esri BIL</bullet_item><para/>
        ///     <bullet_item>.bip - Esri BIP</bullet_item><para/>
        ///     <bullet_item>.bmp—BMP</bullet_item><para/>
        ///     <bullet_item>.bsq—Esri BSQ</bullet_item><para/>
        ///     <bullet_item>.dat—ENVI DAT</bullet_item><para/>
        ///     <bullet_item>.gif—GIF</bullet_item><para/>
        ///     <bullet_item>.img—ERDAS 想象</bullet_item><para/>
        ///     <bullet_item>.jpg - JPEG</bullet_item><para/>
        ///     <bullet_item>.jp2 - JPEG 2000</bullet_item><para/>
        ///     <bullet_item>.png—PNG</bullet_item><para/>
        ///     <bullet_item>.tif—TIFF</bullet_item><para/>
        ///     <bullet_item>.mrf - MRF</bullet_item><para/>
        ///     <bullet_item>.crf - CRF</bullet_item><para/>
        ///     <bullet_item>没有 Esri Grid 的扩展模块</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        /// <param name="_angle">
        /// <para>Angle</para>
        /// <para>Specify a value between 0 and 360 degrees the raster will be rotated in the clockwise direction. To rotate the raster in the counterclockwise direction, specify the angle as a negative value. The angle can be specified as an integer or a floating-point value.</para>
        /// <para>指定一个介于 0 和 360 度之间的值，栅格将沿顺时针方向旋转。要逆时针方向旋转栅格，请将角度指定为负值。角度可以指定为整数或浮点值。</para>
        /// </param>
        public Rotate(object _in_raster, object _out_raster, double? _angle)
        {
            this._in_raster = _in_raster;
            this._out_raster = _out_raster;
            this._angle = _angle;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Rotate";

        public override string CallName => "management.Rotate";

        public override List<string> AcceptEnvironments => ["compression", "configKeyword", "extent", "geographicTransformations", "nodata", "outputCoordinateSystem", "parallelProcessingFactor", "pyramid", "rasterStatistics", "resamplingMethod", "scratchWorkspace", "snapRaster", "tileSize", "workspace"];

        public override object[] ParameterInfo => [_in_raster, _out_raster, _angle, _pivot_point, _resampling_type.GetGPValue(), _clipping_extent];

        /// <summary>
        /// <para>Input Raster</para>
        /// <para>The raster dataset to rotate.</para>
        /// <para>要旋转的栅格数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_raster { get; set; }


        /// <summary>
        /// <para>Output Raster Dataset</para>
        /// <para><xdoc>
        ///   <para>The name, location, and format for the dataset you are creating. When storing a raster dataset in a geodatabase, do not add a file extension to the name of the raster dataset. When storing your raster dataset to a JPEG file, a JPEG 2000 file, a TIFF file, or a geodatabase, you can specify a compression type and compression quality.</para>
        ///   <para>When storing the raster dataset in a file format, you need to specify the file extension:</para>
        ///   <bulletList>
        ///     <bullet_item>.bil—Esri BIL</bullet_item><para/>
        ///     <bullet_item>.bip—Esri BIP</bullet_item><para/>
        ///     <bullet_item>.bmp—BMP</bullet_item><para/>
        ///     <bullet_item>.bsq—Esri BSQ</bullet_item><para/>
        ///     <bullet_item>.dat—ENVI DAT</bullet_item><para/>
        ///     <bullet_item>.gif—GIF</bullet_item><para/>
        ///     <bullet_item>.img—ERDAS IMAGINE</bullet_item><para/>
        ///     <bullet_item>.jpg—JPEG</bullet_item><para/>
        ///     <bullet_item>.jp2—JPEG 2000</bullet_item><para/>
        ///     <bullet_item>.png—PNG</bullet_item><para/>
        ///     <bullet_item>.tif—TIFF</bullet_item><para/>
        ///     <bullet_item>.mrf—MRF</bullet_item><para/>
        ///     <bullet_item>.crf—CRF</bullet_item><para/>
        ///     <bullet_item>No extension for Esri Grid</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要创建的数据集的名称、位置和格式。在地理数据库中存储栅格数据集时，请勿在栅格数据集的名称中添加文件扩展名。将栅格数据集存储为 JPEG 文件、JPEG 2000 文件、TIFF 文件或地理数据库时，可以指定压缩类型和压缩质量。</para>
        ///   <para>以文件格式存储栅格数据集时，需要指定文件扩展名：</para>
        ///   <bulletList>
        ///     <bullet_item>.bil - Esri BIL</bullet_item><para/>
        ///     <bullet_item>.bip - Esri BIP</bullet_item><para/>
        ///     <bullet_item>.bmp—BMP</bullet_item><para/>
        ///     <bullet_item>.bsq—Esri BSQ</bullet_item><para/>
        ///     <bullet_item>.dat—ENVI DAT</bullet_item><para/>
        ///     <bullet_item>.gif—GIF</bullet_item><para/>
        ///     <bullet_item>.img—ERDAS 想象</bullet_item><para/>
        ///     <bullet_item>.jpg - JPEG</bullet_item><para/>
        ///     <bullet_item>.jp2 - JPEG 2000</bullet_item><para/>
        ///     <bullet_item>.png—PNG</bullet_item><para/>
        ///     <bullet_item>.tif—TIFF</bullet_item><para/>
        ///     <bullet_item>.mrf - MRF</bullet_item><para/>
        ///     <bullet_item>.crf - CRF</bullet_item><para/>
        ///     <bullet_item>没有 Esri Grid 的扩展模块</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Raster Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_raster { get; set; }


        /// <summary>
        /// <para>Angle</para>
        /// <para>Specify a value between 0 and 360 degrees the raster will be rotated in the clockwise direction. To rotate the raster in the counterclockwise direction, specify the angle as a negative value. The angle can be specified as an integer or a floating-point value.</para>
        /// <para>指定一个介于 0 和 360 度之间的值，栅格将沿顺时针方向旋转。要逆时针方向旋转栅格，请将角度指定为负值。角度可以指定为整数或浮点值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Angle")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public double? _angle { get; set; }


        /// <summary>
        /// <para>Pivot Point</para>
        /// <para>The point the raster will rotate around. If left blank, the lower left corner of the input raster dataset will serve as the pivot.</para>
        /// <para>栅格将旋转的点。如果留空，则输入栅格数据集的左下角将用作枢轴。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Pivot Point")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _pivot_point { get; set; } = null;


        /// <summary>
        /// <para>Resampling Technique</para>
        /// <para><xdoc>
        ///   <para>The resampling algorithm to be used. The default is Nearest.</para>
        ///   <bulletList>
        ///     <bullet_item>Nearest neighbor— Nearest neighbor is the fastest resampling method; it minimizes changes to pixel values since no new values are created. It is suitable for discrete data, such as land cover.</bullet_item><para/>
        ///     <bullet_item>Bilinear interpolation— Bilinear interpolation calculates the value of each pixel by averaging (weighted for distance) the values of the surrounding four pixels. It is suitable for continuous data.</bullet_item><para/>
        ///     <bullet_item>Cubic convolution— Cubic convolution calculates the value of each pixel by fitting a smooth curve based on the surrounding 16 pixels. This produces the smoothest image but can create values outside of the range found in the source data. It is suitable for continuous data.</bullet_item><para/>
        ///     <bullet_item>Majority resampling—Majority resampling determines the value of each pixel based on the most popular value in a 3 by 3 window. Suitable for discrete data.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>The Nearest and Majority options are used for categorical data, such as a land-use classification. The Nearest option is the default since it is the quickest and also because it will not change the cell values. Do not use either of these for continuous data, such as elevation surfaces.</para>
        ///   <para>The Bilinear option and the Cubic option are most appropriate for continuous data. It is recommended that neither of these be used with categorical data because the cell values may be altered.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要使用的重采样算法。默认值为“最近”。</para>
        ///   <bulletList>
        ///     <bullet_item>最近邻 - 最近邻是最快的重采样方法;它最大限度地减少了对像素值的更改，因为不会创建新值。它适用于离散数据，例如土地覆盖。</bullet_item><para/>
        ///     <bullet_item>双线性插值 — 双线性插值通过对周围四个像素的值进行平均（按距离加权）来计算每个像素的值。它适用于连续数据。</bullet_item><para/>
        ///     <bullet_item>三次卷积— 三次卷积通过基于周围 16 个像素拟合平滑曲线来计算每个像素的值。这将生成最平滑的图像，但可能会创建源数据中查找范围之外的值。它适用于连续数据。</bullet_item><para/>
        ///     <bullet_item>多数重采样 - 多数重采样根据 3 x 3 窗口中最常用的值确定每个像素的值。适用于离散数据。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>“最近”和“多数”选项用于分类数据，例如土地利用分类。“最近”选项是默认选项，因为它是最快的选项，并且因为它不会更改单元格值。请勿将其中任何一个用于连续数据，例如高程表面。</para>
        ///   <para>“双线性”选项和“立方”选项最适合连续数据。建议将这两者都不用于分类数据，因为单元格值可能会更改。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Resampling Technique")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _resampling_type_value _resampling_type { get; set; } = _resampling_type_value._NEAREST;

        public enum _resampling_type_value
        {
            /// <summary>
            /// <para>Nearest neighbor</para>
            /// <para>Nearest neighbor— Nearest neighbor is the fastest resampling method; it minimizes changes to pixel values since no new values are created. It is suitable for discrete data, such as land cover.</para>
            /// <para>最近邻 - 最近邻是最快的重采样方法;它最大限度地减少了对像素值的更改，因为不会创建新值。它适用于离散数据，例如土地覆盖。</para>
            /// </summary>
            [Description("Nearest neighbor")]
            [GPEnumValue("NEAREST")]
            _NEAREST,

            /// <summary>
            /// <para>Bilinear interpolation</para>
            /// <para>Bilinear interpolation— Bilinear interpolation calculates the value of each pixel by averaging (weighted for distance) the values of the surrounding four pixels. It is suitable for continuous data.</para>
            /// <para>双线性插值 — 双线性插值通过对周围四个像素的值进行平均（按距离加权）来计算每个像素的值。它适用于连续数据。</para>
            /// </summary>
            [Description("Bilinear interpolation")]
            [GPEnumValue("BILINEAR")]
            _BILINEAR,

            /// <summary>
            /// <para>Cubic convolution</para>
            /// <para>Cubic convolution— Cubic convolution calculates the value of each pixel by fitting a smooth curve based on the surrounding 16 pixels. This produces the smoothest image but can create values outside of the range found in the source data. It is suitable for continuous data.</para>
            /// <para>三次卷积— 三次卷积通过基于周围 16 个像素拟合平滑曲线来计算每个像素的值。这将生成最平滑的图像，但可能会创建源数据中查找范围之外的值。它适用于连续数据。</para>
            /// </summary>
            [Description("Cubic convolution")]
            [GPEnumValue("CUBIC")]
            _CUBIC,

            /// <summary>
            /// <para>Majority resampling</para>
            /// <para>Majority resampling—Majority resampling determines the value of each pixel based on the most popular value in a 3 by 3 window. Suitable for discrete data.</para>
            /// <para>多数重采样 - 多数重采样根据 3 x 3 窗口中最常用的值确定每个像素的值。适用于离散数据。</para>
            /// </summary>
            [Description("Majority resampling")]
            [GPEnumValue("MAJORITY")]
            _MAJORITY,

        }

        /// <summary>
        /// <para>Clipping Extent</para>
        /// <para><xdoc>
        ///   <para>The processing extent of the raster dataset. The source data will be clipped to the specified extent before rotation.</para>
        ///   <bulletList>
        ///     <bullet_item>Default—The extent will be based on the maximum extent of all participating inputs. This is the default.</bullet_item><para/>
        ///     <bullet_item>Current Display Extent—The extent is equal to the data frame or visible display. The option is not available when there is no active map.</bullet_item><para/>
        ///     <bullet_item>As Specified Below—The extent will be based on the minimum and maximum extent values specified.</bullet_item><para/>
        ///     <bullet_item>Browse—The extent will be based on an existing dataset.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>栅格数据集的处理范围。在旋转之前，源数据将被裁剪到指定的范围。</para>
        ///   <bulletList>
        ///     <bullet_item>默认值 - 范围将基于所有参与输入的最大范围。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>当前显示范围 - 范围等于数据框或可见显示。当没有活动地图时，该选项不可用。</bullet_item><para/>
        ///     <bullet_item>如下所述 - 范围将基于指定的最小和最大范围值。</bullet_item><para/>
        ///     <bullet_item>浏览 - 范围将基于现有数据集。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Clipping Extent")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _clipping_extent { get; set; } = null;


        public Rotate SetEnv(object compression = null, object configKeyword = null, object extent = null, object geographicTransformations = null, object nodata = null, object outputCoordinateSystem = null, object parallelProcessingFactor = null, object pyramid = null, object rasterStatistics = null, object resamplingMethod = null, object scratchWorkspace = null, object snapRaster = null, double[] tileSize = null, object workspace = null)
        {
            base.SetEnv(compression: compression, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, nodata: nodata, outputCoordinateSystem: outputCoordinateSystem, parallelProcessingFactor: parallelProcessingFactor, pyramid: pyramid, rasterStatistics: rasterStatistics, resamplingMethod: resamplingMethod, scratchWorkspace: scratchWorkspace, snapRaster: snapRaster, tileSize: tileSize, workspace: workspace);
            return this;
        }

    }

}